package com.hydra.auth.controller;

import com.hydra.auth.entity.DictData;
import com.hydra.auth.service.SerialNoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 系统发号器的控制器
 * @Author Hydra
 * @Date 2024/07/01 11:42
 */
@Slf4j
@RequestMapping("/api/auth/serialNo")
@RestController
public class SerialNoController {

    @Resource
    private SerialNoService serialNoService;

    /**
     * 生成发号器编码
     * @param type  编码type
     */
    @GetMapping("/generateCode")
    public Object generateCode(@RequestParam("type") String type){
        return this.serialNoService.generateCode(type);
    }

}
